function y = rewiringtime_log_likelihood(gamma,rewiringtime,rewiringtime_censored)

%% Compute likelihood.
dummy = 0;
for i=1:length(rewiringtime)
    dummy = dummy + (1-rewiringtime_censored(i))*log(gamma) - gamma*rewiringtime(i);
end
y = dummy;